package RLK_SOCK;

public class Example_02 {
    public void accept() throws IOException {
        ServerSocket serverSocket = null;
        try {
            serverSocket = new ServerSocket(1034);
            Socket socket = serverSocket.accept();   // socket created
            try {
                final OutputStream outputStream = socket.getOutputStream();
                sendStatus(outputStream);
                outputStream.close();
            } finally {
                socket.close();    // socket closed
            }
        } finally {
            serverSocket.close();
        }
    }
}
